package com.star.sso.repository.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.star.common.orm.annotation.OnCreate;
import com.star.common.orm.annotation.OnUpdate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 基础SSO工具类
 *
 * @author zhouhengzhe
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class BaseSsoPO implements Serializable {
    /**
     * 序列化号
     */
    @Serial
    private static final long serialVersionUID = 448107032039684752L;

    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "系统自增ID")
    private String id;

    @OnCreate
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @OnCreate
    @OnUpdate
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    /**
     * 逻辑删除（1表示已删除，0表示未删除）
     *
     * @see com.star.common.core.contract.enums.DelFlagEnum
     */
    @TableLogic
    @Schema(description = "逻辑删除（1表示已删除，0表示未删除）")
    private Integer delFlag;

    @Schema(description = "创建人编码")
    private String createBy;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "更新人编码")
    private String updateBy;

    @Schema(description = "更新人")
    private String updater;

}
